function FulltankController($scope, $http, $routeParams, FormaterService,
	PaginationService, limitToFilter) {

    $scope.addFullTankView;
    
    $scope.formatDate = function(date) {
	return FormaterService.getFormatDate(date);
    };

    $scope.initPagination = function() {
	return PaginationService.initData('fullTank', 'list', 'id='
		+ $routeParams.id, 'date');
    };

    $scope.getPagination = function() {
	return PaginationService.getPagination();
    };

    $scope.chartObj;
    
    $scope.getChartData = function() {
	$http
	.jsonp(
		'http://localhost:8090/CarManagement/fullTank/lineChartInfo?id='+$routeParams.id+'&callback=JSON_CALLBACK')
	.success(function(data) {
	    $scope.basicAreaChart = data;
	});
	
    };
    
    $scope.showAddFullTankView = function() {
	$scope.addFullTankView = {
	    name : 'addFullTank.html',
	    url : 'appli/view/addFullTank.html?id=' + $routeParams.id
	};
    };
    

        $scope.save = function(ft) {
	console.log(ft);
	$http.jsonp("http://localhost:8090/CarManagement/fullTank/save", {
	    vehicleId :$routeParams.id, 
	    date: ft.date,
	    cost:ft.cost,
	    quantity:ft.quantity,
	    mileage:ft.mileage
	}).success(function(data) {
	    console.log("yeah!!");
	}).error(function(data, status, headers, config) {
	    console.log("Echec !" + status + " " + headers +" "+ config );
	});
    };
       
    // when we first start up, load fullTanks
    $scope.initPagination();
    $scope.getChartData();

}